<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <button @click="function(){ say('hello')}">click1</button>
      <!-- --------- -->
      <button @click="say('hi')">click2</button>
      <!-- --------- -->
      <button @click="print">click3</button>
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {},
        methods: {
          say(ctx) {
            console.log(ctx);
          },
          print: function () {
            console.log("hahaha");
          },
        },
      });
    </script>
  </body>
</html>
